package com.mzz.behavior.classandclass.iterator;

/**
 * @author xushijian
 * @date 18/5/15 下午5:36
 */
public class MyCollection implements Collection {

    /**
     * 声明数组集合
     */
    public String strArray[] = {"A", "B", "C", "D", "E"};

    public Iterator iterator() {
        return new MyIterator(this);
    }

    public Object get(int i) {
        return strArray[i];
    }

    public int size() {
        return strArray.length;
    }
}
